package za.ac.cput.arrowgame.app.factories;

import za.ac.cput.arrowgame.model.Arrow;
import za.ac.cput.arrowgame.model.Direction;
import za.ac.cput.arrowgame.model.GridLocation;
import za.ac.cput.arrowgame.service.requesthandler.Command;

public class AppFactory {
    
    private AppFactory() {
    }

    public static AppFactory getInstance() {
        return AppFactory.NewAppFactory.INSTANCE;
    }

    

    private static class NewAppFactory {
        private static final AppFactory INSTANCE = new AppFactory();
    }
    
    public Arrow createDefaultArrow() {
        return createDefaultArrow(0);
    }
    
    public Arrow createDefaultArrow(int columnCount) {
        return new Arrow(Direction.NORTH, new GridLocation(columnCount, columnCount));
    }
    
    public Arrow createArrow(Direction direction, int size) {
        return new Arrow(direction, new GridLocation(size, size));
    }
    
    public Command createCommand() {
        return new Command();
    }

}
